var hoverZoomPlugins = hoverZoomPlugins || [];
hoverZoomPlugins.push( {
	name: 'TibiaMX',
	version: '0.1',
	prepareImgLinks: function(callback) {
		var res = [];
		$("a[href*=/portada/galeria.html?func=detail&id=] img[src*=http://www.tibiamx.com.mx/components/com_joomgallery/img_thumbnails/]").each(function() {
			var link = $(this).parents('a:eq(0)');
			if (link) {
				var category = this.src.match(/\/components\/com_joomgallery\/img_thumbnails\/.*?_(\d+)\//i)[1];
				var id = link[0].href.match(/\/portada\/galeria\.html\?func=detail&id=(\d+)/i)[1];
				$(link).data('hoverZoomSrc', ['http://www.tibiamx.com.mx/index.php?option=com_joomgallery&func=watermark&catid=' + category + '&id=' + id]);
				$(link).data('hoverZoomCaption', this.alt);
				res.push(link);
			}
		});
		callback($(res));
	}
});